package com.qf.medicaldoctoradmin.onlineSigning.TeamHomepage.controller;

import com.qf.common.annotation.NoLoginCheck;
import com.qf.common.common.R;
import com.qf.medicaldoctoradmin.onlineSigning.TeamHomepage.service.TeamHomepageService;
import com.qf.medicaldoctoradmin.onlineSigning.TeamHomepage.vo.TeamHomepageVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "团队主页")
@RestController
@RequestMapping("/doctorTeam")
@CrossOrigin
public class TeamHomepageController {

    @Resource
    private TeamHomepageService organizationHomepageService;


    @ApiOperation(value = "获取团队信息", notes = "根据团队的id,获得团队及隶属于该团队的医生")
    @GetMapping ("/selectByOrganizationId")
    public R organizationHomepageById(Integer id) {
        TeamHomepageVo teamHomepageVo = organizationHomepageService.organizationHomepageById(id);
        return R.ok(teamHomepageVo);
    }
}
